﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Test_ApplicationBD
{
    public partial class FrmDelMusicOfCd : Form
    {
        public FrmDelMusicOfCd()
        {
            InitializeComponent();
            Commandehelper.RemplirLsv(lsvChoixCD, "CD");
        }

        private void lsvChoixCD_SelectedIndexChanged(object sender, EventArgs e)
        {
            Commandehelper.RemplirLsvMusiqueSelonID_CD(lsvChoixMusique, lsvChoixCD.SelectedIndices[0] + 1);

        }

        private void button1_Click(object sender, EventArgs e)
        {
            Commandehelper.RemplirLsvMusiqueSelonID_CD(lsvChoixMusique, lsvChoixCD.SelectedIndices[0] + 1);
            CD.DeleteTrackOf(lsvChoixCD.SelectedIndices[0] + 1,  1);
        }
    }
}
